﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Kokomo.PeInspector.VisualStudioAdapter
{
	/// <summary>
	/// Represents a property group containing the settings for a build configuration.
	/// </summary>
	/// <remarks>
	/// The list of build propercties include:
	/// <list type="bulleted">
	/// <item><see cref="DebugSymbolsProperty"/></item>
	/// <item><see cref="DebugTypeProperty"/></item>
	/// <item><see cref="OptimizeProperty"/></item>
	/// <item><see cref="OutputPathProperty"/></item>
	/// <item><see cref="DefineConstantsProperty"/></item>
	/// <item><see cref="ErrorReportProperty"/></item>
	/// <item><see cref="WarningLevelProperty"/></item>
	/// </list>
	/// </remarks>
	public class BuildPropertyGroup : PropertyGroup
	{
		public BuildPropertyGroup()
		{
			this.DebugSymbolsProperty = new Property("DebugSymbols");
			this.DebugTypeProperty = new Property("DebugType");
			this.OptimizeProperty = new Property("Optimize");
			this.OutputPathProperty = new Property("OutputPath");
			this.DefineConstantsProperty = new Property("DefineConstants");
			this.ErrorReportProperty = new Property("ErrorReport");
			this.WarningLevelProperty = new Property("WarningLevel");

			this.Properties.AddRange(new Property[] {
				this.DebugSymbolsProperty,
				this.DebugTypeProperty,
				this.OptimizeProperty,
				this.OutputPathProperty,
				this.DefineConstantsProperty,
				this.ErrorReportProperty,
				this.WarningLevelProperty
			});
		}

		/// <summary>
		/// Gets the <c>DebugSymbols</c> property.
		/// </summary>
		public Property DebugSymbolsProperty { get; private set; }
		/// <summary>
		/// Gets or sets the value of the <c>DebugSymbols</c> property.
		/// </summary>
		public bool? DebugSymbols
		{
			get { return (bool?)this.DebugSymbolsProperty.Value; }
			set { this.DebugSymbolsProperty.Value = value; }
		}


		/// <summary>
		/// Gets the <c>DebugType</c> property.
		/// </summary>
		public Property DebugTypeProperty { get; private set; }
		/// <summary>
		/// Gets or sets the value of the <c>DebugType</c> property.
		/// </summary>
		public string DebugType
		{
			get { return (string)this.DebugTypeProperty.Value; }
			set { this.DebugTypeProperty.Value = value; }
		}

		/// <summary>
		/// Gets the <c>Optimize</c> property.
		/// </summary>
		public Property OptimizeProperty { get; private set; }
		/// <summary>
		/// Gets or sets the value of the <c>Optimize</c> property.
		/// </summary>
		public bool? Optimize
		{
			get { return (bool?)this.OptimizeProperty.Value; }
			set { this.OptimizeProperty.Value = value; }
		}

		/// <summary>
		/// Gets the <c>OutputPath</c> property.
		/// </summary>
		public Property OutputPathProperty { get; private set; }
		/// <summary>
		/// Gets or sets the value of the <c>OutputPath</c> property.
		/// </summary>
		public string OutputPath
		{
			get { return (string)this.OutputPathProperty.Value; }
			set { this.OutputPathProperty.Value = value; }
		}

		/// <summary>
		/// Gets the <c>DefineConstants</c> property.
		/// </summary>
		public Property DefineConstantsProperty { get; private set; }
		/// <summary>
		/// Gets or sets the value of the <c>DefineConstants</c> property.
		/// </summary>
		public string DefineConstants
		{
			get { return (string)this.DefineConstantsProperty.Value; }
			set { this.DefineConstantsProperty.Value = value; }
		}

		/// <summary>
		/// Gets the <c>ErrorReport</c> property.
		/// </summary>
		public Property ErrorReportProperty { get; private set; }
		/// <summary>
		/// Gets or sets the value of the <c>ErrorReport</c> property.
		/// </summary>
		public string ErrorReport
		{
			get { return (string)this.ErrorReportProperty.Value; }
			set { this.ErrorReportProperty.Value = value; }
		}

		/// <summary>
		/// Gets the <c>WarningLevel</c> property.
		/// </summary>
		public Property WarningLevelProperty { get; private set; }
		/// <summary>
		/// Gets or sets the value of the <c>WarningLevel</c> property.
		/// </summary>
		public int? WarningLevel
		{
			get { return (int?)this.WarningLevelProperty.Value; }
			set { this.WarningLevelProperty.Value = value; }
		}

	}
}
